home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18154 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  882 b 

  1. Path: lll-winken.llnl.gov!usenet
  2. From: Scott Nelson <nelson18@llnl.gov>
  3. Newsgroups: comp.sys.sgi.apps,comp.lang.c++
  4. Subject: Re: SGI's C++ compiler and the boolean type
  5. Date: Thu, 18 Apr 1996 20:08:00 -0700
  6. Organization: Lawrence Livermore National Laboratory
  7. Message-ID: <31770390.2781@llnl.gov>
  8. References: <4kefm7$oao@ncar.ucar.edu> <4kg6fv$h7k@nic.ftns.no>
  9. NNTP-Posting-Host: canopus.llnl.gov
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.01 (X11; U; IRIX64 6.1 IP26)
  14.  
  15. Arthur Hagen wrote:
  16. > >
  17. > > typedef int     bool;
  18. > > #define true    1
  19. > > #define false   0
  20. > And some argue that true should be -1, because then bitwise not works:
  21.  
  22. We use the following.  It's safe on all platforms:
  23.  
  24. #define FALSE    0
  25. #define TRUE   (!0)
  26.  
  27. Let the built-in ! operator determine what TRUE really is.
  28.  
  29. Scott Nelson
  30.